package net.caixiaomi.info.ui.football;


import net.caixiaomi.info.util.Constants;

/**
 * Created by mengxianzheng on 2018/3/30.
 */

public class FootballTakeOrderAdapterFactory {

    private FootballTakeOrderAdapterFactory() {
    }

    /**
     * 返回不同类型的代理对象
     *
     * @param showType
     * @param adapter
     */
    public static TakeOrderItemViewProxy createItemViewProxy(int showType, FootballTakeOrderAdapter adapter) {

        TakeOrderItemViewProxy itemViewProxy = null;

        switch (showType) {
            case Constants.TYPE_VICTORY_AND_DEFEAT:
            case Constants.TYPE_VICTORY_AND_DEFEAT_1:
                itemViewProxy = new TakeOrderVictoryAndDefeatProxy(adapter);
                break;
            case Constants.TYPE_ALL_GOALS:
                itemViewProxy = new TakeOrderAllGoalsProxy(adapter);
                break;
            case Constants.TYPE_HALF_AND_ALL:
            case Constants.TYPE_SCORE:
            case Constants.TYPE_BLEND:
                itemViewProxy = new TakeOrderHalfAndAllProxy(adapter);
                break;
            case Constants.TYPE_2_IN_1:
                itemViewProxy = new TakeOrderTowInOneProxy(adapter);
                break;

        }

        return itemViewProxy;
    }

}
